//
//  TouchEvent.cpp
//  cali
//
//  Created by Fan Qu on 10/14/19.
//  Copyright © 2019 GF. All rights reserved.
//

#include "TouchEvent.hpp"

Pos2F getMoveVec(const TouchPoint& point) {
    Pos2F vec(0.0, 0.0);
    for (int i = 0; i < point.trace.size() - 1; ++i) {
        vec.x += point.trace[i+1].x - point.trace[i].x;
        vec.y += point.trace[i+1].y - point.trace[i].y;
    }
    return vec;
};
